import {GameFrameworkEventArgs} from "../Base/GameFrameworkEventArgs";
import {ReferencePool} from "../Base/ReferencePool/ReferencePool";

export class WebRequestStartEventArgs extends GameFrameworkEventArgs {
    get serialId(): number {
        return this._serialId;
    }

    get webRequestUri(): string {
        return this._webRequestUri;
    }

    get userData() {
        return this._userData;
    }

    private _serialId: number;
    private _webRequestUri: string;
    private _userData;

    constructor() {
        super();
        this._serialId = 0;
        this._webRequestUri = null;
        this._userData = null;
    }


    public static Create(serialId: number, webRequestUri: string, userData): WebRequestStartEventArgs {
        let webRequestStartEventArgs: WebRequestStartEventArgs = ReferencePool.Acquire(WebRequestStartEventArgs);
        webRequestStartEventArgs._serialId = serialId;
        webRequestStartEventArgs._webRequestUri = webRequestUri;
        webRequestStartEventArgs._userData = userData;
        return webRequestStartEventArgs;
    }

    Clear(): void {
        this._serialId = 0;
        this._webRequestUri = null;
        this._userData = null;


    }

}